The invention relates to a comparator comprising two differential input stages connected in parallel, whose comparator inputs are connected to input voltage sources having a common-mode input voltage and which are fed by a common constant current source whose current is passed either to both or only to the one or only to the other differential input stage, depending on whether the common-mode input voltage of the comparator is within, above or below a voltage range that is between the voltage values of the two poles of a supply voltage source of the comparator, said comparator comprising furthermore a common current mirror circuit which is connected downstream of the outputs of both differential input stages and from which the comparator output signal is derived.
Comparators serve to compare two input voltages. This means, they evaluate the differential voltage present between their inverting and non-inverting inputs. However, they are not able to do this at any arbitrary common-mode input voltages. The reason therefor is that the comparator operates in the desired manner only when it works in its linear range. In usual comparators, the admissible common-mode input voltage range is between the supply voltage and ground and is smaller than the supply voltage present.
In many applications this admissible range of utilization of the common-mode input voltage is not sufficient. For instance, when the supply voltage of the supply voltage source is only 1.5 V, as is the case e.g. in electric wrist watches, there are only about 0.5 V left for the useful range of the common-mode input voltage.
A comparator of the type indicated at the outset is shown in FIG. 2 of the publication "Low-Voltage Operational Amplifier with Rail-to-Rail Input and Output Ranges" by Johan H. Huijsing, published in the IEEE Journal of Solid-State Circuits, Vol. SC-20, No. 6, December 1985, pages 1144 to 1150. By using two differential input stages connected in parallel, the one of which has a npn transistor pair in common-emitter connection and the other one of which has a pnp transistor pair in common-emitter connection, and by using a common constant current source whose current is passed, with the aid of a current diversion circuit, in the lower range of the common-mode input voltage to the one differential input stage, in the upper range of the common-mode input voltage to the other differential stage and in a middle transition range to both differential input stages, and by using a common current mirror which is biased by means of an additional voltage source and is coupled at both ends by means of resistors to the one and to the other differential input stage, respectively, one obtains the result that the admissible common-mode input voltage can be approx. 0.2 V below and above the supply voltage range.
However, there are applications necessitating a comparator which must still function at common-mode input voltages which by far exceed the supply voltage or are much lower than ground potential. An example of such an application is a switching current regulator for an inductive load, as it is shown in FIG. 1 as regards its circuit design and in FIGS. 2a to 2f as regards some voltage and current patterns. The exact mode of operation of this current regulator is described in the simultaneously filed German Patent Application P 37,13,377.2 which corresponds to U.S. patent application Ser. No. 07/184,069, now abandoned, filed concurrently herewith of the applicant, which is entitled "switching current regulator", so that a brief elucidation is sufficient herein.
As long as a transistor T is switched on, a load current i.sub.L flows through the inductive load having an inductivity L and a load resistance R.sub.L, and through a sensor resistor R.sub.S. When the transistor T is switched off, the load current i.sub.L flows through a flyback circuit FL having a diode D and a Zener diode Z. However, this flyback current can flow only when the negative voltage induced in the inductivity L as a consequence of the switching-off operation reaches the flyback voltage U.sub.FL of the flyback circuit FL, since only then will the diodes D and Z be conducting. During the flyback phase the output voltage u.sub.A at the output A, therefore, is equal to the sum of the supply voltage U.sub.B and the flyback voltage U.sub.FL.
During the current regulation the Zener diode Z is bridged with the aid of a switch K so that only the relatively low forward voltage of the diode D is active for the flyback voltage, so that a slow current drop is obtained in the flyback phase. In order to achieve a rapid drop of the load current to zero after deactivation of the current regulator, one opens the switch K so that the sum of the Zener voltage and the diode forward voltage become active as flyback voltage then. During this flyback phase, the output voltage u.sub.A at the output A of the current regulator rises to values that are much higher than the supply voltage. When the current regulator is used, for instance, as a solenoid driver or magnetic valve driver in motor vehicles, rapid deactivation of the current regulator is effected by Zener diodes leading to a flyback voltage in the range of 20 V. In case of an application in the motor vehicle range, an operating voltage of up to 24 V is required. Thus, in the deactivation flyback phase one arrives at an output voltage u.sub.A in the range of 44 V.
This voltage which is far above the supply voltage U.sub.B must be processable as a common-mode input voltage by a comparator which compares the sensor voltage across R.sub.S with the reference voltage across R.sub.R and activates or deactivates the transistor T in accordance with the comparison result.
A comparator circuit of the type known from the publication indicated hereinbefore is far from being capable of handling such a common-mode input voltage.